package com.ruoyi.emergency.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; //添加
import com.ruoyi.emergency.domain.EmergencyTeam;
import com.ruoyi.emergency.mapper.EmergencyTeamMapper;
import com.ruoyi.emergency.service.IEmergencyTeamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 应急救援队伍Service业务层处理
 * 
 * @author hcc
 * @date 2024-11-17
 */
@Service
public class EmergencyTeamServiceImpl extends ServiceImpl<EmergencyTeamMapper, EmergencyTeam> implements IEmergencyTeamService //修改
{
    @Autowired
    private EmergencyTeamMapper emergencyTeamMapper;

    /**
     * 查询应急救援队伍
     * 
     * @param id 应急救援队伍主键
     * @return 应急救援队伍
     */
    @Override
    public EmergencyTeam selectEmergencyTeamById(Long id)
    {
        return emergencyTeamMapper.selectEmergencyTeamById(id);
    }

    /**
     * 查询应急救援队伍列表
     * 
     * @param emergencyTeam 应急救援队伍
     * @return 应急救援队伍
     */
    @Override
    public List<EmergencyTeam> selectEmergencyTeamList(EmergencyTeam emergencyTeam)
    {
        return emergencyTeamMapper.selectEmergencyTeamList(emergencyTeam);
    }

    /**
     * 新增应急救援队伍
     * 
     * @param emergencyTeam 应急救援队伍
     * @return 结果
     */
    @Override
    public int insertEmergencyTeam(EmergencyTeam emergencyTeam)
    {
        return emergencyTeamMapper.insertEmergencyTeam(emergencyTeam);
    }

    /**
     * 修改应急救援队伍
     * 
     * @param emergencyTeam 应急救援队伍
     * @return 结果
     */
    @Override
    public int updateEmergencyTeam(EmergencyTeam emergencyTeam)
    {
        return emergencyTeamMapper.updateEmergencyTeam(emergencyTeam);
    }

    /**
     * 批量删除应急救援队伍
     * 
     * @param ids 需要删除的应急救援队伍主键
     * @return 结果
     */
    @Override
    public int deleteEmergencyTeamByIds(Long[] ids)
    {
        return emergencyTeamMapper.deleteEmergencyTeamByIds(ids);
    }

    /**
     * 删除应急救援队伍信息
     * 
     * @param id 应急救援队伍主键
     * @return 结果
     */
    @Override
    public int deleteEmergencyTeamById(Long id)
    {
        return emergencyTeamMapper.deleteEmergencyTeamById(id);
    }
}
